package com.yixing.tech.common.enums;

/**
 * 推送业务类型
 */
public enum PushBizType {

    EQUIPMENT_WARNING("EQUIPMENT_WARNING", "设备异常预警");

    private String code;

    private String desc;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    PushBizType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static PushBizType getByCode(String code) {
        for (PushBizType type : PushBizType.values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }

}
